<template>
  <div class="info-form-container">
    <van-nav-bar title="手术信息" left-arrow @click-left="$router.back()" />
    <div class="section-title-bg">手术信息</div>
    <div class="form-question-card">
      <div class="form-question required">
        1. 您(曾经/现在/即将)是否有做手术？
      </div>
      <div class="btn-group">
        <button :class="{active: value==='是'}" @click="value='是'">是</button>
        <button :class="{active: value==='否'}" @click="value='否'">否</button>
      </div>
    </div>
    <button class="save-btn" @click="onSave">保存</button>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { NavBar } from 'vant'
const router = useRouter()
const value = ref('')
function onSave() {
  // 保存逻辑
  router.push('/basic-info')
}
</script>

<style scoped>
.info-form-container {
  min-height: 100vh;
  background: #f7f7fb;
  display: flex;
  flex-direction: column;
  font-size: 28px;
  /* padding-top: 92px; 视实际效果决定是否加 */
}
/* 移除.header、.back-btn、.title、.right-btn 样式 */
.section-title-bg {
  background: linear-gradient(90deg, #e3d6ff 0%, #fff 100%);
  color: #444;
  font-size: 32px;
  font-weight: 700;
  padding: 50px 0 50px 20px;
  margin-bottom: 8px;
}
.form-question-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px 0 rgba(80,80,200,0.10);
  padding: 36px 18px 32px 18px;
  margin: 0 16px 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.form-question {
  font-size: 32px;
  color: #222;
  font-weight: 700;
  margin: 0 0 32px 0;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-question.required::before {
  content: '*';
  color: #e74c3c;
  margin-right: 8px;
  font-size: 36px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  height: 1em;
  line-height: 1;
  vertical-align: middle;
}
.btn-group {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
}
.btn-group button {
  min-width: 140px;
  height: 56px;
  font-size: 28px;
  border: 1.5px solid #d6d6e7;
  border-radius: 12px;
  background: #fff;
  color: #222;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-group button.active,
.btn-group button:focus,
.btn-group button:hover {
  border-color: #a48cff;
  color: #a48cff;
  background: #f3f0ff;
}
.save-btn {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  max-width: 600px;
  margin: 0 auto 24px auto;
  z-index: 100;
  padding: 0;
  font-size: 32px;
  height: 76px;
  background: #a48cff;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(80,80,200,0.13);
  cursor: pointer;
  letter-spacing: 2px;
}
.option-btn {
  min-width: 110px !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 24px !important;
  font-size: 28px !important;
  border-radius: 18px !important;
  background: #ede7ff !important;
  color: #7b6ff2 !important;
  border: none !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-shadow: 0 2px 8px rgba(80,80,200,0.04) !important;
  outline: none !important;
  letter-spacing: 2px !important;
  line-height: normal !important;
}
</style> 